//
//  TXYRequestManger.h
//  FunnyVideo
//
//  Created by 李鑫 on 15/8/26.
//  Copyright © 2015年 NewEggTech. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "TXYResponse.h"

/**
 signature 签名类型
 */
typedef enum : NSUInteger {
    TXYSignatureOnce,
    TXYSignaturePersistant,
} TXYSignatureType;

typedef void(^TXYHTTPRequestBlock)(TXYResponse *resp);

@interface TXYRequestManger : NSObject

+ (TXYRequestManger *)sharedRequestManger;
- (void)requestJSONDataFromURL:(NSString *)urlStr secretId:(NSString *)sid postBodys:(NSDictionary *)bodys completion:(TXYHTTPRequestBlock)block;
- (NSString *)requestSignatureBucketName:(NSString *)bucket type:(TXYSignatureType)type;

@property (nonatomic,readonly) NSString *cachedPersSig;
@end
